<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!DOCTYPE html>
<html>
<head>
<meta name="generator"
    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
<meta charset="utf-8" />
<title>会员服务购买 - 会员中心 -<?php echo $cfg_webname; ?></title>
<!--公共样式-->
<!-- <link rel="stylesheet" type="text/css" href="http://js.ibaotu.com/css/com/base_v2.7.css"> -->
<link rel="stylesheet" type="text/css" href="/revision/iconfont/iconfont.css" />
<link href="/revision/css/login/login.css" rel="stylesheet" />
<!--页面css-->
<link rel="stylesheet" type="text/css" href="/revision/css/base/reset.css" />
<link rel="stylesheet" type="text/css" href="/revision/css/base/public_v6.css?v20170904" />
<link rel="stylesheet" type="text/css" href="/revision/css/recharge/recharge_v2.css?v20170928" />
<!--head内js-->
<script src="/revision/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script>
<script language="javascript" type="text/javascript">
<!--
	function CheckLogin(){
	  var taget_obj = document.getElementById('_userlogin');
	  myajax = new DedeAjax(taget_obj,false,false,'','','');
	  myajax.SendGet2("/member/ajax_loginsta.php");
	  DedeXHTTP = null;
	}
	function CheckLogin1(){
	  var taget_obj = document.getElementById('_userlogin1');
	  myajax = new DedeAjax(taget_obj,false,false,'','','');
	  myajax.SendGet2("/member/ajax_loginsta.php");
	  DedeXHTTP = null;
	}
-->
</script>
<script type="text/javascript">
$(document).ready(function(e) {
  	/*收藏*/
	//	CheckOrderState('222017051515053205bce5cae2');
	//$("#sc_id").bind("click",function(){HomepageFavorite.Favorite(window.location.href, document.title);}) ;
	
	//pay_type.init("wx");
	
	//保存支付数据
	//save_pay_data();
	//设置微信支付二维码
	//getWxerwmi();
	CheckOrderState("<?php echo $GLOBALS['_vars']['carts']['orders_id']; ?>");

});
	//CheckOrderState("<?php echo $GLOBALS['_vars']['carts']['orders_id']; ?>");


function CheckOrderState(order_num){
//alert(order_num);
$.ajaxSetup({ cache: false }); 
	$.ajax({
		 url:"/include/payment/lib/Check_order.php",
		 type:"GET",
		 contentType:'text/html; charset=utf-8;',
		 dataType: "json", 
		 data:{"orderID":order_num} ,
		 success: function(txt){
		
		 	if(txt.xstate==1){
				
				alert('支付成功·正在跳转...');
	
				setTimeout(function(){
					//转到首页
					window.location.href  = "/member/";			
				},1000); 
			}else{
				//alert('还没有支付');
				var wx_pay_time = setTimeout(function(){
					 CheckOrderState(order_num); 
				},3000);
				//$("div").data("wxpay_statecheck_time",wx_pay_time);//存储计时器					
			}		
		},
		
		error:function(){
			alert('出错了');
		}
	}) 

}

</script>
<script type="text/javascript">     
	function countDown(secs,surl){         
	 var jumpTo = document.getElementById('jumpTo');
	 	jumpTo.innerHTML=secs;  
		 if(--secs>0){     
			 setTimeout("countDown("+secs+",'"+surl+"')",500);     
		 }else{       
			 location.href=surl;     
			 -ma
		 }     
	 }     
  </script>
<style type="text/css">
.wbi-charge{padding:10px 0;}
.status-tip{padding:10px 0 0;}
.status-tip p.ok_msg{ font-weight:bold; text-align:center; color:#46c37b; font-size:18px;}
</style>
</head>
<body>
<!--低版本提示-->
<!--[if lte IE 9]><style type="text/css">*{ margin: 0; padding: 0;}.topTip{width: 100%;position:fixed; left:0;z-index:99;height: 40px;background: #808080;opacity: 0.5;filter:alpha(opacity=50);    top:0;text-align: center;color: #fff;font: 16px "微软雅黑";line-height: 40px;}</style><div class="topTip">您当前浏览器版本过低，建议使用谷歌或火狐浏览器</div><![endif]-->
<!--公共头-->

<!--内容-->
<div class="recharge-box">
  <div class="re-header per-header">
    <h2> <span class="baotu-id">开通个人VIP</span> </h2>
    <p> <span class="baotu-id"> <span>提升工作效率</span> <span>原创·正版·可商用</span> <span>高速下载</span> </span> </p>
  </div>
  <div class="recharge-con recharge-m">
    <p class="self-info"> <span>开通账号：</span> <span> <img src="<?php echo $cfg_ml->fields['face']; ?>" /> </span> <span><?php echo $cfg_ml->M_LoginID; ?></span> </p>
    <!--选中当前类型  添加类this-card-->
    <div class="wbi-charge">
                  <div class="status-tip">
                    <p class="ok_msg">订单提交成功 <span id="jumpTo">3</span> 秒后将自动跳转至支付宝  <img src="/images/loadfk.gif" height="24" style="line-height:24px; padding-bottom:5px;"></p>
                    <script type="text/javascript">
			  countDown(3,'<?php echo $GLOBALS['_vars']['button']; ?>');
		    </script>
                  </div>
                </div>
  </div>
</div>

</body>
</html>